package com.imooc.joe_springmvc1.prepost;

import javax.annotation.PostConstruct;
import javax.annotation.PreDestroy;

/**
 * 使用JSR250形式的Bean
 * Created by joe on 16-8-10.
 */
public class JSR250WayService {
    @PostConstruct//构造函数执行完之后调用
    public void init(){
        System.out.println("jsr250-init-method");
    }
    public JSR250WayService(){
        System.out.println("初始化构造函数-jsr250");
    }

    @PreDestroy//在Bean销毁之前执行
    public void destroy(){
        System.out.println("jsr-250-destory-method");
    }
}
